<include file="../Public/header_ext" />

<script type="text/javascript" >
	function reload(){
		window.location.reload();
	}
Ext.onReady(function(){
//将表单的提示信息放在边上

Ext.form.Field.prototype.msgTarget = 'side';
Ext.QuickTips.init();
	var staffForm = new Ext.FormPanel({
                    el: 'hello-tabs',
                    id: 'staffForm',
                    name: 'staffForm',
                    autoTabs:true,
                    activeTab:0,
                    deferredRender:false,
                    border:false,

                    items: {
           			 xtype:'tabpanel',
           			 activeTab: 0,
           			 defaults:{autoHeight:true, bodyStyle:'padding:5px'},
            			items:[{
             		   title:'高端人才登录',
             		   contentEl: 'loginInfo',
             	  	 layout:'form',
              		 defaults: {width: 230},
               		 defaultType: 'textfield',
              	  	items: [{
								fieldLabel: '帐号',
								name: 'account',
								style: 'font-size: 15px',
								allowBlank:false
							},{
								fieldLabel: '密码',
								name: 'password',
								style: 'font-size: 15px',
								inputType: 'password',
								allowBlank:false
							},{
								fieldLabel: '验证码',
								name: 'verify',
								maxLength: 4,
								width: 100,
								style: 'font-size:14px;font-weight:bold;letter-spacing: 1px;background:url(__URL__/verify/);background-repeat: no-repeat;background-position: 50px 0px;center right no-repeat;',
								allowBlank:false
							 }]
            },{
                title:'帮助',
                layout:'',
                html: '帮助',
                defaults: {width: 230}
             },{
                title:'关于本系统',
                layout:'',
                html: ' Powered by Thinkphp.cn',
                defaults: {width: 230}
            }]
        }
                });

    var win = new Ext.Window({
                el:'hello-win',
                layout:'fit',
                width:490,
                height:280,
                closeAction:'hide',
                plain: true,
                modal:true,
                collapsible: true,
                draggable: false,
                closable: false,
                items:
                staffForm,
        buttons: [{
				text: '登录',
				type: 'submit',
				handler:function(){
					if(staffForm.form.isValid()){
						staffForm.form.doAction('submit',{
							 url:'__URL__/checkLogin/',
							 method:'post',
							 params:'',
							 waitMsg:'正在登录验证,请稍候...',
							 success:function(form,action){
							 		if (action.result.msg=='OK') {
										document.location='__APP__';
									} else {
										Ext.Msg.alert('登录出错',action.result.msg);
							 		}
							 },
							 failure:function(){
									Ext.Msg.alert('操作','服务器出现错误请稍后再试！');
							 }
                      });
					}
				}
			},{
					text: '取消',
					handler:function(){staffForm.form.reset();}
			}]
            }

            );

            //Ext.get('center-zone')
		win.show();
		loadend();
});



</script>

<div id="center-zone" style="text-align:center;float:center;margin-left:400px;margin-top: 200px;width:210px;" onmouseover="this.style.cursor='pointer';" onclick="javascript:reload();">

</div>

<div id="hello-win" class="x-hidden">
    <div class="x-window-header">{$Think.config.WEB_TITLE}</div>
    <div id="hello-tabs">
        	<img src="../Public/images/systemBanner1.gif"/>
    </div>
<div id='loginInfo' style='color:red;padding-left:120px;'>
<!-- 预设信息,位入登录面板下面一行 -->
</div>
</div>
  <div id="loading-mask" style=""></div>
  <div id="loading">
    <div class="loading-indicator"><img src="../Public/images/loading.gif" width="32" height="32" style="margin-right:8px;" align="absmiddle"/>Loading...</div>
  </div>
<include file="../Public/footer_ext" />
